package com.example.common.enums;

public enum OCStatus {
    NoReceiv(0, "待接诊"),
    Receiv(1, "接诊中"),
    Completed(2, "已完成"),
    TimeOut(3, "超时取消"),;

    private final Integer value;
    private final String description;

    OCStatus(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    
    public Integer getName() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static String valueToDesc(Integer value) {
        if (value == 0) {
            return NoReceiv.getDescription();
        } else if (value == 1) {
            return Receiv.getDescription();
        } else if (value == 2) {
            return Completed.getDescription();
        }else if (value == 3) {
            return TimeOut.getDescription();
        }
        return null;
    }
}
